package com.itheima;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import javax.sql.DataSource;

/**
 * @author Xiao
 * @date 2021/9/11
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("aplicationContext.xml");
        //Druid
        //DataSource dataSourceDruid = (DataSource) ctx.getBean("dataSourceDruid");
        //C3P0
        //DataSource dataSourceC3P0 = (DataSource) ctx.getBean("dataSourceC3P0");
        DataSource dataSource = (DataSource) ctx.getBean("dataSource");
        System.out.println(dataSource);
    }
}
